package com.tem.common.core.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 分页查询基础实体类
 * @author 腾木科技
 * @date 2021/6/12 11:29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageEntity implements Serializable {
    private static final long serialVersionUID = 7143289107025794445L;
    /**
     * 当前页
     */
    private Integer current = 1;
    /**
     * 每页容量
     */
    private Integer size = 10;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date endTime;
}
